/**
 * 
 */
package com.point.business.database.model;

import java.util.Date;
import java.util.List;

import com.point.business.database.managers.UsersManager;
import com.point.business.util.Role;

/**
 * @author Ilija Trajkoski
 * 
 */
public class User {
	private int id;
	private String username;
	private String email;
	private String password;
	private Role role;
	private String fullName;
	private String url;
	private int maxSearchQueries;
	private String notes;
	private Date lastLogin;
	private Date creationDate;
	private String sessionHash;
	private boolean canDoSL;
	private boolean canDoNO;
	private boolean canDoND;
	private boolean canDoUOPB;
	private int queriesCount;
	private String company;
	private String address;
	private String city;
	private String telephone;
	private String cellPhone;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public String getFullName() {
		return fullName;
	}

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	/**
	 * @return the maxSearchQueries
	 */
	public int getMaxSearchQueries() {
		return maxSearchQueries;
	}

	/**
	 * @param maxSearchQueries
	 *            the maxSearchQueries to set
	 */
	public void setMaxSearchQueries(int maxSearchQueries) {
		this.maxSearchQueries = maxSearchQueries;
	}

	/**
	 * @return the notes
	 */
	public String getNotes() {
		return notes;
	}

	/**
	 * @param notes
	 *            the notes to set
	 */
	public void setNotes(String notes) {
		this.notes = notes;
	}

	public Date getLastLogin() {
		return lastLogin;
	}

	public void setLastLogin(Date lastLogin) {
		this.lastLogin = lastLogin;
	}

	public Date getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	public String getSessionHash() {
		return sessionHash;
	}

	public void setSessionHash(String sessionHash) {
		this.sessionHash = sessionHash;
	}

	public List<History> getUserHistory() {
		return UsersManager.getInstance().getUserHistory(this);
	}

	/**
	 * @return the canDoSL
	 */
	public boolean isCanDoSL() {
		return canDoSL;
	}

	/**
	 * @param canDoSL
	 *            the canDoSL to set
	 */
	public void setCanDoSL(boolean canDoSL) {
		this.canDoSL = canDoSL;
	}

	/**
	 * @return the canDoNO
	 */
	public boolean isCanDoNO() {
		return canDoNO;
	}

	/**
	 * @param canDoNO
	 *            the canDoNO to set
	 */
	public void setCanDoNO(boolean canDoNO) {
		this.canDoNO = canDoNO;
	}

	/**
	 * @return the canDoND
	 */
	public boolean isCanDoND() {
		return canDoND;
	}

	/**
	 * @param canDoND
	 *            the canDoND to set
	 */
	public void setCanDoND(boolean canDoND) {
		this.canDoND = canDoND;
	}

	/**
	 * @return the queriesCount
	 */
	public int getQueriesCount() {
		return queriesCount;
	}

	/**
	 * @param queriesCount
	 *            the queriesCount to set
	 */
	public void setQueriesCount(int queriesCount) {
		this.queriesCount = queriesCount;
	}

	/**
	 * @return the company
	 */
	public String getCompany() {
		return company;
	}

	/**
	 * @param company
	 *            the company to set
	 */
	public void setCompany(String company) {
		this.company = company;
	}

	/**
	 * @return the adress
	 */
	public String getAddress() {
		return address;
	}

	/**
	 * @param adress
	 *            the adress to set
	 */
	public void setAddress(String address) {
		this.address = address;
	}

	/**
	 * @return the city
	 */
	public String getCity() {
		return city;
	}

	/**
	 * @param city
	 *            the city to set
	 */
	public void setCity(String city) {
		this.city = city;
	}

	/**
	 * @return the telephone
	 */
	public String getTelephone() {
		return telephone;
	}

	/**
	 * @param telephone
	 *            the telephone to set
	 */
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	/**
	 * @return the cellPhone
	 */
	public String getCellPhone() {
		return cellPhone;
	}

	/**
	 * @param cellPhone
	 *            the cellPhone to set
	 */
	public void setCellPhone(String cellPhone) {
		this.cellPhone = cellPhone;
	}

	/**
	 * @return the canDoUOPB
	 */
	public boolean isCanDoUOPB() {
		return canDoUOPB;
	}

	/**
	 * @param canDoUOPB the canDoUOPB to set
	 */
	public void setCanDoUOPB(boolean canDoUOPB) {
		this.canDoUOPB = canDoUOPB;
	}

}
